import { View,WebView } from '@tarojs/components';
import { getGitlabRedirectUri, GITLAB_APP_ID } from '@/constants/gitlab';
const baseCls = `legions-login-success`;

/** 授权 */
export default function LoginOauth() {
    const redirect_uri = getGitlabRedirectUri()
    const url = `https://gitlab.hoolinks.com/oauth/authorize?client_id=${GITLAB_APP_ID}&redirect_uri=${redirect_uri}&response_type=code&state=weapp&scope=api read_api read_repository write_repository profile read_user`
    return <View className={baseCls}>
        <WebView src={url}></WebView>
    </View>
}